package cn.yz.fresh.dao.impl;

import cn.yz.fresh.dao.IGoodsDAO;
import cn.yz.fresh.pojo.Category;
import cn.yz.fresh.pojo.Goods;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Kim昌完 on 2017/8/30.
 */
@Repository
public class GoodsDAOImpl extends SqlSessionDaoSupport implements IGoodsDAO{
    @Override
    public List<Goods> queryAllGoods(Category category) {
        List<Goods> goodsList = super.getSqlSession().selectList("cn.yz.fresh.pojo.Goods.queryAll", category);
        return goodsList;
    }
}
